package com.wsfk.ssm.entity;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

public class Zip {
	
	private String id;
	private String fileDir;		//zip包存放的地址
	private String handBookId;	//对应手册的ID
	
	
	public Zip() {
		super();
		
	}
	public Zip(String id, String fileDir, String handBookId) {
		super();
		this.id = id;
		this.fileDir = fileDir;
		this.handBookId = handBookId;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getFileDir() {
		return fileDir;
	}
	public void setFileDir(String fileDir) {
		this.fileDir = fileDir;
	}
	public String getHandBookId() {
		return handBookId;
	}
	public void setHandBookId(String handBookId) {
		this.handBookId = handBookId;
	}
	
	@Override
	public String toString() {
		return "Zip [id=" + id + ", fileDir=" + fileDir + ", handBookId="
				+ handBookId + "]";
	}
	
	@Override
	public boolean equals(Object obj) {
		Zip z = (Zip) obj;
		return new EqualsBuilder()
			.append(this.handBookId, z.getHandBookId())
			.append(this.fileDir, z.getFileDir())
			.isEquals();
	}
	
	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}
	
}
